package com.ruihang.generalibrary.utils;

import android.content.Context;
import android.graphics.Typeface;

import com.jiongbull.jlog.JLog;

public class FontProvider {

    private static Typeface face;

    public static boolean useCustomFont;

    public static void init(Context context) {
        JLog.e("TextView def:"+ Typeface.DEFAULT);
        face = Typeface.createFromAsset(context.getAssets(), "fonts/msyh.ttf");
//		face = Typeface.DEFAULT;
    }

    public static Typeface getTypeface(Context context) {
        if (face == null) {
            try {
                init(context);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return face;
    }
}
